home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 May
/
EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso
/
earcd
/
comm
/
mail
/
yamlist.lha
/
mail2users.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1997-02-21
|
1KB
|
55 lines
/*
** $VER: Forward.rexx 1.0 (12.30.96)
**
** Written by Peter Greci <midgard@nycmetro.com>
**
** It forwards messages from the incoming folder to members of the
** mailing list.
**/
OPTIONS RESULTS
ADDRESS YAM
SetFolder 1 /* outgoing */
GetFolderInfo MAX; entries = RESULT
ADDRESS REXX
Do Until eof('plist')=1
open('plist','listserv:list','R')
newad=readln('plist')
ADDRESS YAM
DO i=0 TO entries-1
SetMail i
GetMailInfo SUBJECT
sub=RESULT
GetMailInfo FROM
ret=RESULT
parse var ret crap '<'user'>' .
parse var newad crap '<'testad'>'
if verifyuser(user) & upper(user)~=upper(testad) then do /* no bounce */
mailforward
writemailto newad
writequeue
end
END
end
if entries>0 then do
mailsendall
mailarchive 3
setfolder 3
maildelete
setfolder 0
end
EXIT
verifyuser:
parse arg test .
open('checklist','listserv:list','R')
do until eof('checklist')
checkuser=readln('checklist')
if upper(checkuser)=upper(test) then do
close(checklist)
return 1
end
end
close('checklist')
return 0